using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.H_SpecialTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HL_SpecialTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HL_SpecialTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HL_Special";
			dataTableMapping.ColumnMappings.Add("SpecialID", "SpecialID");
			dataTableMapping.ColumnMappings.Add("ChannelID", "ChannelID");
			dataTableMapping.ColumnMappings.Add("SpecialName", "SpecialName");
			dataTableMapping.ColumnMappings.Add("OpenType", "OpenType");
			dataTableMapping.ColumnMappings.Add("SpecialPicUrl", "SpecialPicUrl");
			dataTableMapping.ColumnMappings.Add("OrderID", "OrderID");
			dataTableMapping.ColumnMappings.Add("Tips", "Tips");
			dataTableMapping.ColumnMappings.Add("ReadMe", "ReadMe");
			dataTableMapping.ColumnMappings.Add("SkinID", "SkinID");
			dataTableMapping.ColumnMappings.Add("Template", "Template");
			dataTableMapping.ColumnMappings.Add("SpecialDir", "SpecialDir");
			dataTableMapping.ColumnMappings.Add("MaxPerPage", "MaxPerPage");
			dataTableMapping.ColumnMappings.Add("IsElite", "IsElite");
			dataTableMapping.ColumnMappings.Add("Custom_Content", "Custom_Content");
			dataTableMapping.ColumnMappings.Add("IsVisible", "IsVisible");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HL_Special] WHERE (([SpecialID] = @Original_SpecialID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_SpecialID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "SpecialID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HL_Special] ([ChannelID], [SpecialName], [OpenType], [SpecialPicUrl], [OrderID], [Tips], [ReadMe], [SkinID], [Template], [SpecialDir], [MaxPerPage], [IsElite], [Custom_Content], [IsVisible]) VALUES (@ChannelID, @SpecialName, @OpenType, @SpecialPicUrl, @OrderID, @Tips, @ReadMe, @SkinID, @Template, @SpecialDir, @MaxPerPage, @IsElite, @Custom_Content, @IsVisible)";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ChannelID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChannelID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@SpecialName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "SpecialName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@OpenType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "OpenType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@SpecialPicUrl", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "SpecialPicUrl", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@OrderID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "OrderID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Tips", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "Tips", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ReadMe", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "ReadMe", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@SkinID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "SkinID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Template", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "Template", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@SpecialDir", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "SpecialDir", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@MaxPerPage", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "MaxPerPage", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@IsElite", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsElite", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Custom_Content", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "Custom_Content", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@IsVisible", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsVisible", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HL_Special] SET [ChannelID] = @ChannelID, [SpecialName] = @SpecialName, [OpenType] = @OpenType, [SpecialPicUrl] = @SpecialPicUrl, [OrderID] = @OrderID, [Tips] = @Tips, [ReadMe] = @ReadMe, [SkinID] = @SkinID, [Template] = @Template, [SpecialDir] = @SpecialDir, [MaxPerPage] = @MaxPerPage, [IsElite] = @IsElite, [Custom_Content] = @Custom_Content, [IsVisible] = @IsVisible WHERE (([SpecialID] = @Original_SpecialID))";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ChannelID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChannelID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@SpecialName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "SpecialName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@OpenType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "OpenType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@SpecialPicUrl", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "SpecialPicUrl", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@OrderID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "OrderID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Tips", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "Tips", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ReadMe", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "ReadMe", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@SkinID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "SkinID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Template", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "Template", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@SpecialDir", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "SpecialDir", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@MaxPerPage", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "MaxPerPage", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@IsElite", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsElite", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Custom_Content", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "Custom_Content", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@IsVisible", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsVisible", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_SpecialID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "SpecialID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[8];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT SpecialID, ChannelID, SpecialName, OpenType, SpecialPicUrl, OrderID, Tips, \r\n      ReadMe, SkinID, Template, SpecialDir, MaxPerPage, IsElite, Custom_Content, \r\n      IsVisible\r\nFROM HL_Special";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "SELECT    *\r\nFROM         HL_Special\r\nWHERE     ( SpecialDir = @SpecialDir)";
			this._commandCollection[1].CommandType = CommandType.Text;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@SpecialDir", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "SpecialDir", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "SELECT SpecialID, ChannelID, SpecialName, OpenType, SpecialPicUrl, OrderID, Tips, \r\n      ReadMe, SkinID, Template, SpecialDir, MaxPerPage, IsElite, Custom_Content, \r\n      IsVisible\r\nFROM HL_Special\r\nWHERE (ChannelID = @ChannelID)";
			this._commandCollection[2].CommandType = CommandType.Text;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@ChannelID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ChannelID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "SELECT ChannelID, Custom_Content, IsElite, MaxPerPage, OpenType, OrderID, ReadMe, \r\n      SkinID, SpecialDir, SpecialID, SpecialName, SpecialPicUrl, Template, Tips, \r\n      IsVisible\r\nFROM HL_Special\r\nWHERE (SkinID = @SkinID)";
			this._commandCollection[3].CommandType = CommandType.Text;
			this._commandCollection[3].Parameters.Add(new SqlParameter("@SkinID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "SkinID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4] = new SqlCommand();
			this._commandCollection[4].Connection = this.Connection;
			this._commandCollection[4].CommandText = "SELECT ChannelID, Custom_Content, IsElite, MaxPerPage, OpenType, OrderID, ReadMe, \r\n      SkinID, SpecialDir, SpecialID, SpecialName, SpecialPicUrl, Template, Tips, \r\n      IsVisible\r\nFROM HL_Special\r\nWHERE (SpecialID = @SpecialID)";
			this._commandCollection[4].CommandType = CommandType.Text;
			this._commandCollection[4].Parameters.Add(new SqlParameter("@SpecialID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "SpecialID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5] = new SqlCommand();
			this._commandCollection[5].Connection = this.Connection;
			this._commandCollection[5].CommandText = "SELECT ChannelID, Custom_Content, IsElite, MaxPerPage, OpenType, OrderID, ReadMe, \r\n      SkinID, SpecialDir, SpecialID, SpecialName, SpecialPicUrl, Template, Tips, \r\n      IsVisible\r\nFROM HL_Special\r\nWHERE (Template = @Template)";
			this._commandCollection[5].CommandType = CommandType.Text;
			this._commandCollection[5].Parameters.Add(new SqlParameter("@Template", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "Template", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6] = new SqlCommand();
			this._commandCollection[6].Connection = this.Connection;
			this._commandCollection[6].CommandText = "SELECT SpecialID, ChannelID, SpecialName, OpenType, SpecialPicUrl, OrderID, Tips, \r\n      ReadMe, SkinID, Template, SpecialDir, MaxPerPage, IsElite, Custom_Content, \r\n      IsVisible\r\nFROM HL_Special\r\nWHERE (IsElite = 1)";
			this._commandCollection[6].CommandType = CommandType.Text;
			this._commandCollection[7] = new SqlCommand();
			this._commandCollection[7].Connection = this.Connection;
			this._commandCollection[7].CommandText = "UPDATE [HL_Special] SET  [OpenType] = @OpenType, [SkinID] = @SkinID, [Template] = @Template,[MaxPerPage] = @MaxPerPage, [IsElite] = @IsElite WHERE [SpecialID] in( Select * From fn_Split( @SpecialID,','))";
			this._commandCollection[7].CommandType = CommandType.Text;
			this._commandCollection[7].Parameters.Add(new SqlParameter("@OpenType", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "OpenType", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@SkinID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "SkinID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@Template", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "Template", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@MaxPerPage", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "MaxPerPage", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@IsElite", SqlDbType.Bit, 1, ParameterDirection.Input, 0, 0, "IsElite", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@SpecialID", SqlDbType.VarChar, 1024, ParameterDirection.Input, 0, 0, "", DataRowVersion.Original, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Special.HL_SpecialDataTable GetAllSpecial()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			H_Special.HL_SpecialDataTable hL_SpecialDataTable = new H_Special.HL_SpecialDataTable();
			this.Adapter.Fill(hL_SpecialDataTable);
			return hL_SpecialDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Special.HL_SpecialDataTable GetSpecialBybySpecialDir(string SpecialDir)
		{
			this.Adapter.SelectCommand = this.CommandCollection[1];
			if (SpecialDir == null)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = SpecialDir;
			}
			H_Special.HL_SpecialDataTable hL_SpecialDataTable = new H_Special.HL_SpecialDataTable();
			this.Adapter.Fill(hL_SpecialDataTable);
			return hL_SpecialDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Special.HL_SpecialDataTable GetSpecialByChannel(int? ChannelID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[2];
			if (ChannelID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = ChannelID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			H_Special.HL_SpecialDataTable hL_SpecialDataTable = new H_Special.HL_SpecialDataTable();
			this.Adapter.Fill(hL_SpecialDataTable);
			return hL_SpecialDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Special.HL_SpecialDataTable GetSpecialBySkinID(int? SkinID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			if (SkinID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = SkinID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			H_Special.HL_SpecialDataTable hL_SpecialDataTable = new H_Special.HL_SpecialDataTable();
			this.Adapter.Fill(hL_SpecialDataTable);
			return hL_SpecialDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Special.HL_SpecialDataTable GetSpecialBySpecialID(int SpecialID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[4];
			this.Adapter.SelectCommand.Parameters[0].Value = SpecialID;
			H_Special.HL_SpecialDataTable hL_SpecialDataTable = new H_Special.HL_SpecialDataTable();
			this.Adapter.Fill(hL_SpecialDataTable);
			return hL_SpecialDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Special.HL_SpecialDataTable GetSpecialByTemplateID(string Template)
		{
			this.Adapter.SelectCommand = this.CommandCollection[5];
			if (Template == null)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = Template;
			}
			H_Special.HL_SpecialDataTable hL_SpecialDataTable = new H_Special.HL_SpecialDataTable();
			this.Adapter.Fill(hL_SpecialDataTable);
			return hL_SpecialDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Special.HL_SpecialDataTable GetSpecialIsElite()
		{
			this.Adapter.SelectCommand = this.CommandCollection[6];
			H_Special.HL_SpecialDataTable hL_SpecialDataTable = new H_Special.HL_SpecialDataTable();
			this.Adapter.Fill(hL_SpecialDataTable);
			return hL_SpecialDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(H_Special.HL_SpecialDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(H_Special dataSet)
		{
			return this.Adapter.Update(dataSet, "HL_Special");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[DataObjectMethod(DataObjectMethodType.Delete, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Delete(int Original_SpecialID)
		{
			this.Adapter.DeleteCommand.Parameters[0].Value = Original_SpecialID;
			ConnectionState state = this.Adapter.DeleteCommand.Connection.State;
			if ((this.Adapter.DeleteCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.DeleteCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.DeleteCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.DeleteCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Insert, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Insert(int? ChannelID, string SpecialName, int? OpenType, string SpecialPicUrl, int? OrderID, string Tips, string ReadMe, int? SkinID, string Template, string SpecialDir, int? MaxPerPage, bool? IsElite, string Custom_Content, bool? IsVisible)
		{
			if (ChannelID.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[0].Value = ChannelID.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[0].Value = System.DBNull.Value;
			}
			if (SpecialName == null)
			{
				this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[1].Value = SpecialName;
			}
			if (OpenType.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[2].Value = OpenType.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
			}
			if (SpecialPicUrl == null)
			{
				this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[3].Value = SpecialPicUrl;
			}
			if (OrderID.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[4].Value = OrderID.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
			}
			if (Tips == null)
			{
				this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[5].Value = Tips;
			}
			if (ReadMe == null)
			{
				this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[6].Value = ReadMe;
			}
			if (SkinID.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[7].Value = SkinID.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value;
			}
			if (Template == null)
			{
				this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[8].Value = Template;
			}
			if (SpecialDir == null)
			{
				this.Adapter.InsertCommand.Parameters[9].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[9].Value = SpecialDir;
			}
			if (MaxPerPage.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[10].Value = MaxPerPage.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[10].Value = System.DBNull.Value;
			}
			if (IsElite.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[11].Value = IsElite.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[11].Value = System.DBNull.Value;
			}
			if (Custom_Content == null)
			{
				this.Adapter.InsertCommand.Parameters[12].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[12].Value = Custom_Content;
			}
			if (IsVisible.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[13].Value = IsVisible.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[13].Value = System.DBNull.Value;
			}
			ConnectionState state = this.Adapter.InsertCommand.Connection.State;
			if ((this.Adapter.InsertCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.InsertCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.InsertCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.InsertCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(int? ChannelID, string SpecialName, int? OpenType, string SpecialPicUrl, int? OrderID, string Tips, string ReadMe, int? SkinID, string Template, string SpecialDir, int? MaxPerPage, bool? IsElite, string Custom_Content, bool? IsVisible, int Original_SpecialID)
		{
			if (ChannelID.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[0].Value = ChannelID.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[0].Value = System.DBNull.Value;
			}
			if (SpecialName == null)
			{
				this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[1].Value = SpecialName;
			}
			if (OpenType.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[2].Value = OpenType.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
			}
			if (SpecialPicUrl == null)
			{
				this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[3].Value = SpecialPicUrl;
			}
			if (OrderID.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[4].Value = OrderID.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
			}
			if (Tips == null)
			{
				this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[5].Value = Tips;
			}
			if (ReadMe == null)
			{
				this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[6].Value = ReadMe;
			}
			if (SkinID.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[7].Value = SkinID.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
			}
			if (Template == null)
			{
				this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[8].Value = Template;
			}
			if (SpecialDir == null)
			{
				this.Adapter.UpdateCommand.Parameters[9].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[9].Value = SpecialDir;
			}
			if (MaxPerPage.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[10].Value = MaxPerPage.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value;
			}
			if (IsElite.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[11].Value = IsElite.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[11].Value = System.DBNull.Value;
			}
			if (Custom_Content == null)
			{
				this.Adapter.UpdateCommand.Parameters[12].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[12].Value = Custom_Content;
			}
			if (IsVisible.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[13].Value = IsVisible.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[13].Value = System.DBNull.Value;
			}
			this.Adapter.UpdateCommand.Parameters[14].Value = Original_SpecialID;
			ConnectionState state = this.Adapter.UpdateCommand.Connection.State;
			if ((this.Adapter.UpdateCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.UpdateCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.UpdateCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.UpdateCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int UpdateSpecialS(int? OpenType, int? SkinID, string Template, int? MaxPerPage, bool? IsElite, string SpecialID)
		{
			SqlCommand sqlCommand = this.CommandCollection[7];
			if (OpenType.HasValue)
			{
				sqlCommand.Parameters[0].Value = OpenType.Value;
			}
			else
			{
				sqlCommand.Parameters[0].Value = System.DBNull.Value;
			}
			if (SkinID.HasValue)
			{
				sqlCommand.Parameters[1].Value = SkinID.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (Template == null)
			{
				sqlCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[2].Value = Template;
			}
			if (MaxPerPage.HasValue)
			{
				sqlCommand.Parameters[3].Value = MaxPerPage.Value;
			}
			else
			{
				sqlCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (IsElite.HasValue)
			{
				sqlCommand.Parameters[4].Value = IsElite.Value;
			}
			else
			{
				sqlCommand.Parameters[4].Value = System.DBNull.Value;
			}
			if (SpecialID == null)
			{
				throw new System.ArgumentNullException("SpecialID");
			}
			sqlCommand.Parameters[5].Value = SpecialID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
